﻿using AvalonDock;

namespace iStudio.Structure.Control.Module
{
    public class ModuleWindow : DockableContent
    {
        private readonly Engine.Module _moduleInstance;

        protected Engine.Module ModuleApi
        {
            get
            {
                return _moduleInstance;
            }
        }

        public ModuleWindow ()
        {
            
        }

        public ModuleWindow(Engine.Module module)
        {
            _moduleInstance = module;
        }

        public override bool Close()
        {
            ModuleApi.OnCompleted ();

            return base.Close();
        }
    }
}
